import request from '@/utils/request'

// 查询人脸库列表
export function listDatabase(query) {
  return request({
    url: '/system/database/list',
    method: 'get',
    params: query
  })
}

// 查询人脸库详细
export function getDatabase(id) {
  return request({
    url: '/system/database/' + id,
    method: 'get'
  })
}

// 新增人脸库
export function addDatabase(data) {
  return request({
    url: '/system/database',
    method: 'post',
    data: data
  })
}

// 修改人脸库
export function updateDatabase(data) {
  return request({
    url: '/system/database',
    method: 'put',
    data: data
  })
}

// 删除人脸库
export function delDatabase(id) {
  return request({
    url: '/system/database/' + id,
    method: 'delete'
  })
}

// 对比人脸
export function compare(data) {
  return request({
    url: '/system/compareFace/compare',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data;'
    }
  })
}

// 监测人脸
export function detectFace(data) {
  return request({
    url: '/system/compareFace/detectFace',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data;'
    }
  })
}
// 搜索人脸
export function searchFace(data) {
  return request({
    url: '/system/compareFace/searchFace',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data;'
    }
  })
}
